package iterator;

import java.io.IOException;

import global.AttrType;
import heap.FieldNumberOutOfBoundException;
import heap.InvalidTupleSizeException;
import heap.InvalidTypeException;
import heap.Triple;
import heap.Tuple;
import btree.Interface3;


public class TripleUtils extends TupleUtils{

	/**
	 * @param args
	 * @throws IOException 
	 * @throws InvalidTupleSizeException 
	 * @throws InvalidTypeException 
	 * @throws TupleUtilsException 
	 * @throws UnknowAttrType 
	 * @throws FieldNumberOutOfBoundException 
	 */
	public static void main(String[] args) throws InvalidTypeException, InvalidTupleSizeException, IOException, UnknowAttrType, TupleUtilsException, FieldNumberOutOfBoundException {
		// TODO Auto-generated method stub

		String str = "testing";
		byte[] b = str.getBytes();
		Triple t1 = new Triple(b,0,46);
		Triple t2 = new Triple(b,0,46);
		t1.printTuple();
		
		int i = TripleUtils.CompareTupleWithTuple(new AttrType(AttrType.attrString), t1, 1, t2, 1);
		System.out.println(i);
		
		
		int j = TripleUtils.CompareTupleWithValue(new AttrType(AttrType.attrString), t1, 1, t2);
		System.out.println(j);
	}

}
